class HotwordModel {
  String? errorMsg;
  int? errorCode;
  List<DataListBean>? data;

  HotwordModel({this.errorMsg, this.errorCode, this.data});

  factory HotwordModel.fromMap(Map<String, dynamic> map) {
    return HotwordModel(
      errorMsg: map['errorMsg'],
      errorCode: map['errorCode'],
      data: DataListBean.fromMapList(map['data']),
    );
  }

  static List<HotwordModel> fromMapList(dynamic mapList) {
    if (mapList == null) return [];
    return List<HotwordModel>.from(mapList.map((map) => HotwordModel.fromMap(map)));
  }
}

class DataListBean {
  String? link;
  String? name;
  int? id;
  int? order;
  int? visible;

  DataListBean({this.link, this.name, this.id, this.order, this.visible});

  factory DataListBean.fromMap(Map<String, dynamic> map) {
    return DataListBean(
      link: map['link'],
      name: map['name'],
      id: map['id'],
      order: map['order'],
      visible: map['visible'],
    );
  }

  static List<DataListBean> fromMapList(dynamic mapList) {
    if (mapList == null) return [];
    return List<DataListBean>.from(mapList.map((map) => DataListBean.fromMap(map)));
  }
}
